package fr.umlv.jee.jawp.persistence.dao;

import java.util.List;
import fr.umlv.jee.jawp.persistence.object.Product;

public interface IProductDAO {

	/*************************************
	 * Creation
	 *************************************/

	public Product createNewProduct(String ASIN, String name, int categoryId, int limit);

	/*************************************
	 * Getter
	 *************************************/

	public List<Product> getProducts();

	public List<Product> getProductsByCategory(int categoryId);

	public Product getProductByASIN(String ASIN);

	public Product getProductByNameAndCategory(String name, int categoryId);
	
	public Product getProductName(Product product);
	
	public long getNbProduct();
	
	public List<Product> getProductsUnderLimit();
	
	public List<Product> getProductsByMaximumStock(int stock);
	
	public List<Product> getProductsByResponsible(String responsible);

	/*************************************
	 * Setter
	 *************************************/

	public void setResponsible(Product p, String responsible);
	
	public void saveProduct(Product p);
	
	public void saveProducts(List<Product> products);

	/*************************************
	 * Deletion
	 *************************************/

	public void deleteProduct(String ASIN);

	public void deleteProductsByCategory(int categoryId);

	public void clearDB();
}
